using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;
using Thaire.Investment.Domains.Transaction;

namespace Thaire.Investment.Repository.Mapping
{

    class LoansHeaderMap : ClassMap<LoansHeader>
    {

        public LoansHeaderMap()
        {
            Table("LOANS_HEADER");
            Id(x => x.LoansHeaderID, "LOANS_HEADER_ID").GeneratedBy.Identity();

            Map(x => x.CompanyName, "COMPANY_NAME");
            Map(x => x.CompanyID, "COMPANY_ID");
            Map(x => x.MaturityStatus, "MATURITY_STATUS");
            Map(x => x.LoanTypeID, "LOAN_TYPE_ID");
            Map(x => x.LoanTypeName, "LOAN_TYPE_NAME");
            Map(x => x.ContractNumber, "CONTRACT_NUMBER");
            Map(x => x.LoanObjectiveID, "LOAN_OBJECTIVE_ID");
            Map(x => x.BorrowerName, "BORROWER_NAME");
            Map(x => x.BorrowerOccupationName, "BORROWER_OCCUPATION_NAME");
            Map(x => x.BorrowerOccupationID, "BORROWER_OCCUPATION_ID");
            Map(x => x.BorrowerIDCardNO, "BORROWER_ID_CARD_NO");
            Map(x => x.GuarantorName, "GUARANTOR_NAME");
            Map(x => x.GuarantorOcuupationName, "GUARANTOR_OCUUPATION_NAME");
            Map(x => x.GuarantorOcuupationID, "GUARANTOR_OCUUPATION_ID");
            Map(x => x.GuarantorIDCardNO, "GUARANTOR_ID_CARD_NO");
            Map(x => x.GuaranteeTypeID, "GUARANTEE_TYPE_ID");
            Map(x => x.MortgagorName1, "MORTGAGOR_NAME_1");
            Map(x => x.MortgagorName2, "MORTGAGOR_NAME_2");
            Map(x => x.MortgagorName3, "MORTGAGOR_NAME_3");
            Map(x => x.AssessmentMortgateID, "ASSESSMENT_MORTGATE_ID");
            Map(x => x.TitleDeedMapsheetNO, "TITLE_DEED_MAPSHEET_NO");
            Map(x => x.TitleDeedParcelNO, "TITLE_DEED_PARCEL_NO");
            Map(x => x.TitleDeedDealingFileNO, "TITLE_DEED_DEALING_FILE_NO");
            Map(x => x.TitleDeedNO, "TITLE_DEED_NO");
            Map(x => x.TitleDeedVolumn, "TITLE_DEED_VOLUMN");
            Map(x => x.TitleDeedPage, "TITLE_DEED_PAGE");
            Map(x => x.TitleDeedProvinceName, "TITLE_DEED_PROVINCE_NAME");
            Map(x => x.TitleDeedProvinceID, "TITLE_DEED_PROVINCE_ID");
            Map(x => x.TitleDeedDistrictName, "TITLE_DEED_DISTRICT_NAME");
            Map(x => x.TitleDeedDistrictID, "TITLE_DEED_DISTRICT_ID");
            Map(x => x.TitleDeedSubDistrictName, "TITLE_DEED_SUB_DISTRICT_NAME");
            Map(x => x.TitleDeedSubDistrictID, "TITLE_DEED_SUB_DISTRICT_ID");
            Map(x => x.TitleDeedTotalArea, "TITLE_DEED_TOTAL_AREA");
            Map(x => x.ApartmentNO, "APARTMENT_NO");
            Map(x => x.ApartmentFloor, "APARTMENT_FLOOR");
            Map(x => x.ApartmentBuildingNO, "APARTMENT_BUILDING_NO");
            Map(x => x.ApartmentBuildingName, "APARTMENT_BUILDING_NAME");
            Map(x => x.RegisterBuildingNO, "REGISTER_BUILDING_NO");
            Map(x => x.MortgageDate, "MORTGAGE_DATE");
            Map(x => x.ContractStartDate, "CONTRACT_START_DATE");
            Map(x => x.ContractEndDate, "CONTRACT_END_DATE");
            Map(x => x.AssessmentDate, "ASSESSMENT_DATE");
            Map(x => x.AssessmentCost, "ASSESSMENT_COST");
            Map(x => x.AssetValue, "ASSET_VALUE");
            Map(x => x.ContractAmount, "CONTRACT_AMOUNT");
            Map(x => x.LiquidityTierIPercent, "LIQUIDITY_TIER_I_PERCENT");
            Map(x => x.LiquidityTierIIPercent, "LIQUIDITY_TIER_II_PERCENT");
            Map(x => x.LiquidityLowLiquidityPercent, "LIQUIDITY_LOW_LIQUIDITY_PERCENT");
            Map(x => x.Liquidity, "LIQUIDITY");
            Map(x => x.InvolvedPartyTypeId, "INVOLVED_PARTY_TYPE_ID");
            Map(x => x.InvolvedPartyTypeName, "INVOLVED_PARTY_TYPE_NAME");
            Map(x => x.InsuranceNO, "INSURANCE_NO");
            Map(x => x.ProtectionStartDate, "PROTECTION_START_DATE");
            Map(x => x.ProtectionEndDate, "PROTECTION_END_DATE");
            Map(x => x.CreateDate, "CREATE_DATE");
            Map(x => x.CreateBY, "CREATE_BY");
            Map(x => x.ModifyDate, "MODIFY_DATE");
            Map(x => x.ModifyBY, "MODIFY_BY");

        }


    }

}